package test;
import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import expression.PostfixEvaluator;

public class JasonFidukPETest {

	@Before
	public void setUp() throws Exception {
	}

	@Test
	public void test1() {
		int answer = PostfixEvaluator.eval("5  2 *  1 - 3 /");
		assertTrue(answer == 3);
	}

	@Test
	public void test2() {
		int answer = PostfixEvaluator.eval("20 10 / 2 15 * 5 /  +");
		assertTrue(answer == 8);
	}

	@Test
	public void test3() {
		int answer = PostfixEvaluator.eval("10 10 * 50  2 * - 7 +");
		assertTrue(answer == 7);
	}

	@Test
	public void test4() {
		int answer = PostfixEvaluator.eval("50 25 - 5  + 25   - 7 *");
		assertTrue(answer == 35);
	}

	@Test
	public void test5() {
		int answer = PostfixEvaluator.eval("10 5  /  8 * 10  2  / -");
		assertTrue(answer == 11);
	}

}
